Focusing and Focus Metrics for a Plenoptic Imaging System

ABSTRACT

Metrics for characterizing the focusing of a plenoptic imaging system. In one aspect, the metric is based on the high frequency content and/or the blurring of the plenoptic image.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates generally to plenoptic imaging systems, and more particularly to focusing of plenoptic imaging systems.

2. Description of the Related Art

The plenoptic imaging system has recently received increased attention. It can be used to recalculate a different focus point or point of view of an object, based on digital processing of the captured plenoptic image. The plenoptic system also finds application in multi-modal imaging, using a multi-modal filter array in the plane of the pupil aperture. Each filter is imaged at the sensor, effectively producing a multiplexed image of the object for each imaging modality at the filter plane. Other applications for plenoptic imaging systems include varying depth of field imaging and high dynamic range imaging.

However, there is limited literature on the optical design of a plenoptic imaging system that goes beyond geometric optics considerations. Thus far, most of the literature about these systems is concentrated in the areas of computer vision, graphics and digital processing algorithms—how to further process the “light field” properties of the data captured at the sensor of a plenoptic system. These algorithms focus on what to do with the plenoptic images after they are captured. In addition, many of those algorithms are not specific to plenoptic imaging systems; they can be directly transferred to completely different configurations, such as multi-lens imaging systems (multiple cameras mounted adjacent to one another). This body of work assumes that the plenoptic imaging system has been well designed, manufactured and assembled. However, there is not much literature explaining how to actually design, manufacture or assemble plenoptic imaging systems.

As one example, consider the “focusing” a plenoptic imaging system. Much is known about how to focus a conventional imaging system, in order to produce a sharp image of the object at the sensor. However, a plenoptic imaging system that is “in focus” does not produce a sharp image of the object at the sensor array. In a plenoptic imaging system, the sensor array is not placed at a plane conjugate to the image plane. Therefore, conventional focusing criteria are not appropriate for focusing a plenoptic system. In order to design a plenoptic system, including diffraction effects, it is desirable to obtain an appropriate evaluation metric that can be used to gauge the quality of the system.

Thus, there is need for such criteria.

SUMMARY OF THE INVENTION

The present invention overcomes the limitations of the prior art by providing approaches to adjust the axial spacing (i.e., “defocus”) of components in a plenoptic imaging system based on the plenoptic image captured by the sensor array.

A plenoptic imaging system includes a primary imaging subsystem, a secondary imaging array, and a sensor array. A plenoptic imaging system that is “in focus” will not produce a sharp image of the object at the sensor array. Thus, focusing metrics different from those used in conventional imaging systems are required. In one approach, the axial position of the secondary imaging array relative to the primary imaging subsystem is adjusted based on increasing a high frequency content in the plenoptic image captured by the sensor array. In different variations, this is achieved by using metrics based on the frequency of ringing in the plenoptic image, on the number of ripples caused by ringing in the plenoptic image, or on the flatness or contrast of ringing in the plenoptic image.

Furthermore, the axial position of the sensor array relative to the secondary imaging array can be adjusted based on reducing a blur in a pupil image function of the plenoptic imaging system. In addition, the distance to the object can be estimated once the in-focus positions of the secondary imaging array and/or sensor array have been determined.

These principles can also be used in other ways. For example, they can be used as the basis for a plenoptic imaging system with autofocus capability. Alternately, they can be used to retrofit a plenoptic sensor module (i.e., secondary imaging array plus sensor array) onto an existing imaging system. As a final example, merit functions based on the plenoptic image can be used in the design process for the plenoptic imaging system.

Other aspects of the invention include methods, devices, systems and applications related to the principles described above.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention has other advantages and features which will be more readily apparent from the following detailed description of the invention and the appended claims, when taken in conjunction with the accompanying drawings, in which:

FIG. 1 is a simplified diagram of a plenoptic imaging system.

FIGS. 2 a-2 d are simulated images showing the response of an in-focus system.

FIGS. 3 a-3 d are simulated images showing the response of a system with defocus in z₂.

FIGS. 4 a-4 d are simulated images showing the response of a system with defocus in z₃.

FIG. 5 is a flow diagram for aligning a plenoptic imaging system.

FIG. 6 a is a plot of flatness as a function of z₂.

FIG. 6 b is a plot of the number of low frequency ripples as a function of z₂.

FIG. 7 a is a plot of edge sharpness as a function of z₃.

FIG. 7 b is a plot of edge width as a function of z₃.

FIG. 8 is a diagram of a plenoptic imaging system with autofocus.

FIG. 9 a (prior art) and FIG. 9 b are diagrams of a plenoptic sensor module retrofitted to an existing imaging system.

FIG. 10 is a flow diagram for designing a plenoptic imaging system.

The figures depict embodiments of the present invention for purposes of illustration only. One skilled in the art will readily recognize from the following discussion that alternative embodiments of the structures and methods illustrated herein may be employed without departing from the principles of the invention described herein.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The figures and the following description relate to preferred embodiments by way of illustration only. It should be noted that from the following discussion, alternative embodiments of the structures and methods disclosed herein will be readily recognized as viable alternatives that may be employed without departing from the principles of what is claimed.

Sample Configuration.

FIG. 1 is a simplified diagram of a plenoptic imaging system. The system includes a primary imaging subsystem 110 (represented by a single lens in FIG. 1), a secondary imaging array 120 (represented by a lenslet array) and a sensor array 130. These form two overlapping imaging subsystems, referred to as subsystem 1 and subsystem 2 in FIG. 1.

The spatial coordinates (ξ,η) will be used at the object plane, (x,y) at the pupil plane for imaging subsystem 1, (u, v) at the plane of the lenslet array, and (t, w) at the sensor plane. The primary lens is a distance z₁ from the object, the lenslet array is a distance z₂ from the primary lens, and the sensor is a distance z₃ from the lenslet array. In FIG. 1, the different components are each located at a single plane so the distances between components is easy to define. However, in other systems, the different components may be more complex (e.g., the primary “lens” may be a set of lenses), but the concept of the distances z₁, z₂, z₃ can be generalized using known principles. The focal lengths of the primary lens and the lenslet array are represented by f₁ and f₂ and their diameters are D₁ and D₂, respectively. In addition, the different components do not have to be designed exactly as shown in FIG. 1. For example, the “primary lens” could be various combinations of elements, including lenses, mirrors and combinations of the two. Similarly, the secondary imaging array could be a pinhole array, or a reflective array.

In imaging subsystem 1, the object 150 is imaged by the primary lens 110 to produce an image that will be referred to as the “primary image.” This primary lens 110 may be a camera imaging lens, microscope objective lens or any other such imaging system. The lenslet array 120 is placed approximately at the location of the primary image. Each lenslet then images the pupil of the primary lens to the sensor plane. This is imaging subsystem 2, which partially overlaps with imaging subsystem 1. The image created at the sensor array 130 will be referred to as the “plenoptic image” in order to avoid confusion with the “primary image.” The plenoptic image can be divided into an array of subimages, corresponding to each of the lenslets. Note, however, that the subimages are images of the pupil of imaging subsystem 1, and not of the object 150.

Wave Propagation Analysis.

Now analyze this system based on wave propagation. Consider the first imaging subsystem, where the primary lens has a generalized pupil function P₁. Its corresponding impulse response is given by

$\begin{matrix} {{{h_{1}\left( {u,{v;\xi},\eta} \right)} = {\frac{^{j\; {kz}_{1}}}{\lambda^{2}z_{1}z_{2}}{\exp \left\lbrack {\frac{j\; k}{2\; z_{2}}\left( {u^{2} + v^{2}} \right)} \right\rbrack}{\exp \left\lbrack {\frac{j\; k}{2\; z_{1}}\left( {\xi^{2} + \eta^{2}} \right)} \right\rbrack}{\int{\int{{x}{y}\; {P_{1}\left( {x,y} \right)}{\exp \left\lbrack {\frac{j\; k}{2}\left( {\frac{1}{z_{1}} + \frac{1}{z_{2}} - \frac{1}{f_{1}}} \right)\left( {x^{2} + y^{2}} \right)} \right\rbrack}\exp \left\{ {- {\frac{j\; k}{z_{2}}\left\lbrack {{\left( {u - {M\; \xi}} \right)x} + {\left( {v - {M\; \eta}} \right)y}} \right\rbrack}} \right\}}}}}},} & (1) \end{matrix}$

where λ is the wavelength of imaging, k=2π/λ and the magnification from object to image plane is given by M=−z₂/z₁. Substituting, x′=x/λz₂ and y′=y/λz₂ in the integral in Eq. (1) yields

$\begin{matrix} {{\lambda^{2}z_{1}z_{2}{\int{\int{{x^{\prime}}{y^{\prime}}\; {P_{1}\left( {{x^{\prime}\lambda \; z_{2}},{y^{\prime}\lambda \; z_{2}}} \right)}{\exp\left\lbrack {\frac{j\; k}{2}{\left( {\frac{1}{z_{1}} + \frac{1}{z_{2}} - \frac{1}{f_{1}}} \right)\left\lbrack {\left( {x^{\prime}\lambda \; z_{2}} \right)^{2} + \left( {y^{\prime}\lambda \; z_{2}} \right)^{2}} \right\rbrack}} \right\}}\exp \left\{ {{- j}\; 2\; {\pi \left\lbrack {{\left( {u - {M\; \xi}} \right)x^{\prime}} + {\left( {v - {M\; \eta}} \right)y^{\prime}}} \right\rbrack}} \right\}}}}} = {\left. {\lambda^{2}z_{1}z_{2}{{FT}\left( {{P_{1}\left( {{x^{\prime}\lambda \; z_{2}},{y^{\prime}\lambda \; z_{2}}} \right)}\exp \left\{ {\frac{j\; k}{2}{\left( {\frac{1}{z_{1}} + \frac{1}{z_{2}} - \frac{1}{f_{1}}} \right)\left\lbrack {\left( {x^{\prime}\lambda \; z_{2}} \right)^{2} + \left( {y^{\prime}\lambda \; z_{2}} \right)^{2}} \right\rbrack}} \right\}} \right)}} \right|_{\underset{{fy} = {({v - {M\; \eta}})}}{{fx} = {({u - {M\; \xi}})}}} = {\lambda^{2}z_{1}z_{2}{h_{1}^{\prime}\left( {{u - {M\; \xi}},{v - {M\; \eta}}} \right)}}}} & (2) \end{matrix}$

where we have defined the term h₁′ for convenience as

$\begin{matrix} {{h_{1}^{\prime}\left( {u,v} \right)} = {{FT}\left( {{P_{1}\left( {{x\; \lambda \; z_{2}},{y\; \lambda \; z_{2}}} \right)}\exp \left\{ {\frac{j\; k}{2}{\left( {\frac{1}{z_{1}} + \frac{1}{z_{2}} - \frac{1}{f_{1}}} \right)\left\lbrack {\left( {x\; \lambda \; z_{2}} \right)^{2} + \left( {y\; \lambda \; z_{2}} \right)^{2}} \right\rbrack}} \right\}} \right)}} & (3) \end{matrix}$

This reduces Eq. (1) to

$\begin{matrix} {{h_{1}\left( {u,{v;\xi},\eta} \right)} = {^{j\; {kz}_{1}}{\exp \left\lbrack {\frac{j\; k}{2\; z_{2}}\left( {u^{2} + v^{2}} \right)} \right\rbrack}{\exp \left\lbrack {\frac{j\; k}{2\; z_{1}}\left( {\xi^{2 +} + \eta^{2}} \right)} \right\rbrack}{{h_{1}^{\prime}\left( {{u - {M\; \xi}},{v - {M\; \eta}}} \right)}.}}} & (4) \end{matrix}$

An object having a complex field U_(o) then produces an image at the plane of the lenslet array, given by,

U _(i)(u,v)=∫∫dξdηh ₁(u,v;ξ,η)U _(o)(ξ,η).

Using Eqs. (4) and (5) and substituting ξ′=Mξ and n′=Mη yields

$\begin{matrix} {{U_{i}\left( {u,v} \right)} = {\frac{^{j\; {kz}_{1}}}{M^{2}}{\exp \left\lbrack {\frac{j\; k}{2\; z_{2}}\left( {u^{2} + v^{2}} \right)} \right\rbrack}{\int{\int\; {{\xi^{\prime}}{\eta^{\prime}}{U_{o}\left( {\frac{\xi^{\prime}}{M},\frac{\eta^{\prime}}{M}} \right)}\exp \left\{ {\frac{j\; k}{2\; z_{1}}\left\lbrack {\left( \frac{\xi^{\prime}}{M} \right)^{2} + \left( \frac{\eta^{\prime}}{M} \right)^{2}} \right\rbrack} \right\} {{h_{1}^{\prime}\left( {{u - \xi^{\prime}},{v - \eta^{\prime}}} \right)}.}}}}}} & (6) \end{matrix}$

The above equation can be written as a convolution (indicated by the symbol *):

$\begin{matrix} {{U_{i}\left( {u,v} \right)} = {\frac{^{j\; {kz}_{1}}}{M^{2}}{\exp \left\lbrack {\frac{j\; k}{2\; z_{2}}\left( {u^{2} + v^{2}} \right)} \right\rbrack}{\left\{ {\left\lbrack {{U_{o}\left( {\frac{u}{M},\frac{v}{M}} \right)}\exp \left\{ {\frac{j\; k}{2\; z_{1}}\left\lbrack {\left( \frac{u}{M} \right)^{2} + \left( \frac{v}{M} \right)^{2}} \right\rbrack} \right\}} \right\rbrack*{h_{1}^{\prime}\left( {u,v} \right)}} \right\}.}}} & (7) \end{matrix}$

This yields the field of the first image formed by the primary lens at the plane of the lenslet array.

We assume each lenslet has a diameter D₂, focal length f₂, pupil function given by P₂ and there are M′×N′ such lenslets in the array. Then the amplitude distribution of the field U_(i) after the lenslet array may be written as

$\begin{matrix} {{U_{i}^{\prime}\left( {u,v} \right)} = {{U_{i}\left( {u,v} \right)}{\sum\limits_{m \in M^{\prime}}^{\;}{\sum\limits_{n \in N^{\prime}}{{P_{2}\left( {{u - {m\; D_{2}}},{v - {nD}_{2}}} \right)}\exp {\left\{ {\frac{{- j}\; k}{2\; f_{2}}\left\lbrack {\left( {u - {m\; D_{2}}} \right)^{2} + \left( {v - {nD}_{2}} \right)^{2}} \right\rbrack} \right\}.}}}}}} & (8) \end{matrix}$

Using the Fresnel transform to propagate this field to the sensor, which is located a distance z₃ from the lenslet array, yields

$\begin{matrix} {{U_{f}\left( {t,w} \right)} = {\frac{^{j\; {kz}_{3}}}{j\; \lambda \; z_{3}}{\exp \left\lbrack {\frac{j\; k}{2\; z_{3}}\left( {t^{2} + w^{2}} \right)} \right\rbrack}{\sum\limits_{m \in M^{\prime}}^{\;}{\sum\limits_{n \in N^{\prime}}{\int{\int{{u}{v}\; {U_{i}\left( {u,v} \right)}{P_{2}\left( {{u - {m\; D_{2}}},{v - {nD}_{2}}} \right)}\exp \left\{ {\frac{{- j}\; k}{2\; f_{2}}\left\lbrack {\left( {u - {m\; D_{2}}} \right)^{2} + \left( {v - {nD}_{2}} \right)^{2}} \right\rbrack} \right\} {\exp \left\lbrack {\frac{j\; k}{2\; z_{3}}\left( {u^{2} + v^{2}} \right)} \right\rbrack}{{\exp \left\lbrack {\frac{{- j}\; k}{z_{3}}\left( {{ut} + {vw}} \right)} \right\rbrack}.}}}}}}}} & (9) \end{matrix}$

Further simplification gives

$\begin{matrix} {{U_{f}\left( {t,w} \right)} = \left. {\frac{^{j\; {kz}_{3}}}{j\; \lambda \; z_{3}}{\exp \left\lbrack {\frac{j\; k}{2\; z_{3}}\left( {t^{2} + w^{2}} \right)} \right\rbrack}{\sum\limits_{m \in M^{\prime}}^{\;}{\sum\limits_{n \in N^{\prime}}{\exp \left\{ {\frac{{- j}\; k}{2\; f_{2}}\left\lbrack {\left( {m\; D_{2}} \right)^{2} + \left( {nD}_{2} \right)^{2}} \right\rbrack} \right\} {FT}\left\{ {{U_{i}\left( {u,v} \right)}{P_{2}\left( {{u - {m\; D_{2}}},{v - {nD}_{2}}} \right)}{\exp \left\lbrack {\frac{j\; k}{2}\left( {\frac{1}{z_{3}} - \frac{1}{f_{2}}} \right)\left( {u^{2} + v^{2}} \right)} \right\rbrack}} \right\}}}}} \right|_{\underset{f_{y} = {\frac{w}{\lambda \; z_{3}}\frac{{nD}_{2}}{\lambda \; f_{2}}}}{f_{x} = {\frac{t}{\lambda \; z_{3}}{(\frac{m\; D_{2}}{\lambda \; f_{2}})}}}}} & (10) \end{matrix}$

Using Eq. (10), the plenoptic image captured at the sensor is given by,

$\begin{matrix} {{I_{f}\left( {t,w} \right)} = {{\left. {\frac{^{j\; {kz}_{3}}}{j\; \lambda \; z_{3}}{\exp \left\lbrack {\frac{j\; k}{2\; z_{3}}\left( {t^{2} + w^{2}} \right)} \right\rbrack}{\sum\limits_{m}{\sum\limits_{n}{{xp}\left\{ {\frac{{- j}\; k}{2\; f_{2}}\left\lbrack {\left( {m\; D_{2}} \right)^{2} + \left( {nD}_{2} \right)^{2}} \right\rbrack} \right\} {FT}\left\{ {{U_{i}\left( {u,v} \right)}{P_{2}\left( {{u - {m\; D_{2}}},{v - {nD}_{2}}} \right)}{\exp \left\lbrack {\frac{j\; k}{2}\left( {\frac{1}{z_{3}} - \frac{1}{f_{2}}} \right)\left( {u^{2} + v^{2}} \right)} \right\rbrack}} \right\}}}}} \right|_{\underset{f_{y} = {\frac{w}{\lambda \; z_{3}}\frac{{nD}_{2}}{\lambda \; f_{2}}}}{f_{x} = {\frac{t}{\lambda \; z_{3}}{(\frac{m\; D_{2}}{\lambda \; f_{2}})}}}}}.}} & (11) \end{matrix}$

Simulation Results.

We simulated this analysis in Matlab for a general non-fluorescent, point object and tested the effect of varying the axial distances in the system. The focal lengths of the primary lens and the lenslet array were f₁=51 mm and f₂=5 mm. The primary lens aperture is a pentagon inscribed in a circle of diameter D₁=10 mm. The pentagon shape was selected so that pupil effects and object effects would be more evident. The object is at an object distance z₁=500 mm from the primary lens. Each lenslet in the multi-lenslet array is circular with a diameter D₂=0.5 mm. The ideal distance of the lenslet array from the plane of the primary lens was calculated to be 56.8 mm, based on z₂=1/(1/f₁−1/z₁). The ideal distance for the sensor from the lenslet array is 5.5 mm, given by z₃=1/(1/f₂−1/z₂).

For the sake of brevity, we display simulation results for only the on-axis lenslet and on-axis object point. However, the analysis and simulations remain valid for off-axis object points and lenslets. For example, an on-axis object point will produce a primary image that, if in focus, will produce a focused spot on the on-axis lenslet. A similar situation can be produced for all (or a selected subset) of the lenslets in the array by using an object that is an array of point sources, each point source imaged to a corresponding lenslet.

In Focus System.

FIGS. 2 a-2 d are simulated images showing the response of this system when it is in focus. Under these conditions, the first imaging subsystem is in perfect focus. Hence the on-axis point object is imaged to a tightly focused spot at the plane of the lenslet array, which corresponds to the impulse response of the first imaging subsystem. It is then truncated by the finite extent of the on-axis lenslet. The truncated impulse response is shown in FIG. 2 a. The impulse is displayed as |U′_(i)|^(0.1) in FIG. 2 a in order to emphasize its dim details. The five streaks radiating from the center of the impulse response correspond to the Fourier transform of the five-sided (pentagon) pupil of the primary lens in our simulations. The pentagon shape was selected purely for illustrative purposes. The circular boundary corresponds to the edge of the circular lenslet.

This field U′_(i) is then propagated to and captured at the sensor as intensity I_(f), given in Eq. (11). FIGS. 2 b-2 d show one subimage of the plenoptic image. Since the object is a point source, the subimage is an image of the pentagon shaped pupil of the primary lens. FIG. 2 b displays I_(f) ^(0.1) and FIG. 2 c shows a magnified portion of this. FIG. 2 d shows the same magnified portion as FIG. 2 c, but I_(f) ^(2.5) is displayed in order to show the fine rings at the edges due to the truncation. For convenience, we will refer to this image of the pupil, produced by each lenslet for a point object, as the pupil image function (PIF).

In the ideal case where z₁, z₂ and z₃ are in focus, there are fine fringes in the interior of the pupil image function, and the edges have a small sharp overshoot as seen in FIG. 2 d. However, overall, the edges of the PIF are sharp and the interior is relatively flat.

Defocus of z₂.

Now consider the effect of a defocus error in z₂. Assuming accurate z₁ and z₃, we now test the effect of inaccuracy in the value of z₂. We retained z₁=500 mm and z₃=5.5 mm. But instead of 56.8 mm, we use z₂=54 mm. FIGS. 3 a-3 d are simulated images showing the response of the system with defocus in z₂.

FIG. 3 a shows the impulse response of the first imaging subsystem, as truncated by the lenslet. As shown in FIG. 3 a, defocus in the value of z₂ implies that the lenslet array is placed at an axial position where the impulse response of the first imaging subsystem contains some defocus. Therefore, the lenslet array captures and truncates this defocused impulse response of the primary lens. This is further propagated to the sensor and captured as the pupil image function shown in FIGS. 3 b-3 d. FIGS. 3 b and 3 c display I_(f) ^(2.5) and I_(f) ^(0.1), respectively. FIG. 3 d is a magnified view of FIG. 3 c. The PIF shows ringing in the interior (compare FIGS. 3 b and 2 b), but FIGS. 3 c-3 d show that the edges of the pentagon shaped image of the pupil of the primary lens remain relatively sharp. This is probably because, despite the defocus in the first imaging subsystem, the second imaging subsystem which images the pupil of the primary lens at the sensor has greater tolerance to variation in z₂ and remains reasonably focused.

Defocus of z₃.

Now consider the effect of defocus error in z₃. Assuming accurate z₁ and z₂, we now test the effect of inaccuracy in the value of z₃. We retained z₁=500 mm and z₂=56.8 mm. But instead of 5.5 mm, we use z₃=5 mm. FIGS. 4 a-4 d are simulated images showing the response of the system with defocus in z₃.

FIG. 4 a shows the impulse response of the first imaging subsystem. As expected, inaccuracy in z₃ has no influence on the first imaging subsystem. Therefore, the point object is imaged accurately on the lenslet array. However, defocus in z₃ creates defocus in the second imaging subsystem. FIGS. 4 b and 4 c display I_(f) ^(2.5) and I_(f) ^(0.1), respectively. FIG. 4 d is a magnified view of FIG. 4 c. FIGS. 4 c-4 d show that the edges of the pentagon shaped pupil image are now blurred, even though the interior of the PIF is relatively flat as shown in FIG. 4 b.

Some Applications.

As shown above, blur in the edges of the PIF is an indicator of defocus in z₃ and ringing in the interior of the PIF (more generally, the amount of high frequency content in the PIF) is an indicator of defocus in z₂. These indicators can be used in a number of different ways. For example, they can be used to help determine the correct axial spacing of the components within a plenoptic imaging system. Depending on which characteristic is observed, either the distance between the primary imaging subsystem and the secondary imaging array (z₂) and/or the distance between the secondary imaging array and the sensor array (z₃) may be adjusted. This alignment may occur during assembly of the plenoptic imaging system, or it may be implemented as an autofocus or manual focus adjustment of the plenoptic imaging system in the field. Alignment may also occur when an existing imaging system is converted to a plenoptic imaging system by replacing the existing sensor array with a plenoptic sensor module (i.e., secondary imaging array plus sensor array). In that case, the plenoptic sensor module must be aligned to the primary imaging optics in the existing system.

Another use is during the system design process. It is difficult to design a plenoptic imaging system using conventional lens design software because there are not well-defined metrics that capture the quality of a plenoptic imaging system. However, metrics based on the characteristics above can now be used to optimize the plenoptic imaging system with respect to defocus. As a final example application, the characteristics above can be used in an inverse fashion to estimate the object distance z₁. If the optimal distances z₂ and z₃ are known (e.g., by optimizing the blur and high frequency characteristics), then this can be used to estimate object distance z₁.

Possible Metrics.

Flatness/high frequency content metrics. Defocus in z₂ (i.e., separation of primary imaging subsystem and secondary imaging array) is characterized by ringing in the interior of the PIF. More generally, it is characterized by the amount of high frequency content in the PIF. As z₂ comes into focus, the ringing becomes higher frequency and less modulated (i.e., there are more ridges but with a lower contrast, so the interior becomes flatter). This is because the high frequency content in the PIF is increasing. Different metrics can be used to measure these characteristics. For example, metrics can be based on slope analysis for the detection of maxima or minima, counting the number of peaks and valleys of the ringing (i.e., local maxima and minima), spatial frequency analysis (e.g., percent energy contained above a certain frequency, or distribution of energy across frequencies) or flatness of the ringing (e.g., modulation divided by DC level).

Two examples of automated detection of this criterion use image processing functions in Matlab. One example metric counts the peaks in the interior of the PIF with the function “imregionalmax” in Matlab. This function detects the peaks in a local neighborhood. We sum the total number of peaks detected inside the PIF. When the interior of the PIF becomes flatter, the local peaks (ripples) in it become finer and increase in number. Therefore decreasing defocus in z₂ should be characterized by an increasing number of local peaks.

Another example metric is based on the Matlab function “edge” with the option of using the “canny” edge detector. This function is less sensitive to fine local variations and detects longer, continuous edges inside the PIF (unlike imregionalmax where the local peaks may be single pixels). As the PIF becomes flatter, the number of these low frequency peak-to-valley ripples decreases since the PIF is dominated more by the fine local variations. Therefore the canny edge detector finds fewer edges as the defocus of z₂ decreases.

Blur Metric:

The blur around the edges of the PIF can be detected, for example, by using sharpness or contrast detection algorithms. One example is based on taking a derivative of the PIF along either the x or y dimension (rows or columns). The PIF whose derivative shows the maximum slope contains the sharpest edges and should indicate the optimal position of z₃. In simulations, we used the Matlab function “diff(PIF,1)” to obtain the derivative. The peak-to-valley difference in diff(PIF,1) is approximated to be the greatest slope for that PIF. This slope should increase as the defocus in z₃ decreases.

Another blur metric is based on thresholding the edge of the PIF and counting all the pixels that have a value above the selected threshold. As the blur reduces, the number of pixels in the edges should decrease.

Note that this phenomenon has been described using the word “blur,” but it should be understood that metrics for sharpness, contrast, etc. may also be measures of blur.

Example Automated Alignment

FIG. 5 is a flow diagram for aligning a plenoptic imaging system, based on the principles described above. In this example, it is assumed that the object is at an unknown object distance z₁, so that it is not possible to accurately calculate z₂ and z₃. Instead, z₂ and z₃ are adjusted as follows. As an initial setting, z₃ is set 510 to f₂. Then z₂ is adjusted 520 based on increasing the high frequency content in the plenoptic image captured by the sensor array. Then z₃ is adjusted 530 based on reducing blur in the PIF. Steps 520 and 530 may be iterated, or interchanged. Alternately, z₂ and z₃ may be adjusted simultaneously based on a metric that accounts for both the high frequency and blur characteristics. More details are given below, using the example plenoptic imaging system introduced previously.

In step 510, the sensor array is moved to the back focal plane of the lenslet array, i.e. z₃=f₂=5 mm. This can be done experimentally using collimated light and using the lenslet array to focus it to a tight spot at the sensor.

In step 520, we move 522 the lenslet array and sensor array in concert, so that z₂ changes while z₃ remains constant. The sensor array captures 525 the plenoptic image at different values of z₂. A flatness metric is calculated 526 at these different values. In this example, z₁=500 mm and z₃=f₂=5 mm. FIG. 6 a plots the number of pixels in the local peaks detected by imregionalmax for z₂˜54 mm to 58 mm. This plot shows a maximum at z₂=56.8 mm. FIG. 6 b plots the number of pixels in the edges detected by the canny edge detector for z₂˜54 mm to 58 mm. It shows a minimum, also at z₂=56.8 mm. These curves for two different metrics both show 527 that the axial position z₂=56.8 mm for the lenslet array gives the flattest interior for the PIF. Thus, the lenslet array is set 529 to this location. So z₁=500 mm and z₂=56.8 mm.

In step 530, we move 532 the sensor so that z₃ changes. A similar procedure to step 520 is used. The sensor array captures 535 the plenoptic image at different values of z₃. The blur metric is calculated 536 at these different values. FIG. 7 a plots the max-to-min difference in the derivative of the PIF (along the rows), obtained using the function diff(PIF,1) in Matlab. The plot shows a maximum for z₃=5.5 mm. FIG. 7 b plots the number of pixels in the thresholded edge blur for z₃=5.1 mm to 5.8 mm. It also shows a minimum at z₃=5.5 mm. These curves for two different blur metrics both show 537 that the axial position z₃=5.5 mm for the sensor array reduces the blur the most. Thus, the sensor array is set 539 to this location.

Note that FIGS. 6-7 each show plots for three different lenslets. Recall that the lenslet array contains multiple lenslets, each of which produces a corresponding subimage within the plenoptic image. This array nature can be addressed in different ways. For example, the various metrics (blur, flatness, high frequency content, etc.) can be calculated for each subimage and these metrics combined into a single metric for optimization. Two common methods for combining are based on averaging (including weighted averaging), or on taking the worst case. Also, the metric can be calculated for all subimages, or for just a subset or sampling of the subimages. Different wavelengths in the plenoptic image can be handled in a similar manner. If the plenoptic imaging system has a fixed position for a range of object distances, then the variation in object distance can also be handled in a similar manner (e.g., by taking some combination of the performances at different object distances). Plenoptic imaging systems are commonly used to effect different filtering for different subimages by placing corresponding filters in the pupil. For example, different wavelength filters may be used at different locations in the pupil. The performance over different subimages can also be handled in a similar manner.

More Applications

If the plenoptic imaging system is adjustable, then the principles described above can be implemented in an autofocus mechanism. FIG. 8 is a block diagram of a plenoptic imaging system with autofocus. The autofocus mechanism 850 receives the plenoptic image captured by the sensor array 130 and, based on the captured image, adjusts the distances z₂ and/or z₃. In one approach, the distances are adjusted based on an algorithm such as described in FIG. 5.

In other applications, z₁ may be varied in addition to or in place of z₂ and/or z₃. For example, if the distance from secondary imaging array to sensor array is fixed (i.e., fixed z₃), it may be possible to focus the plenoptic imaging system by adjusting the object distance z₁.

In another approach, a lookup table lists z₃ values that correspond to different values of z₂. The distance z₂ is determined based on the captured plenoptic image, and distance z₃ is determined based on the lookup table.

As another variation, once z₂ and/or z₃ are determined, they can be used to estimate the object distance z₁. The look-up table may be stored in software in hardware/firmare on a chip.

In yet another approach, the plenoptic imaging system is focused, either manually or automatically, by use of a single adjustment. For example, instead of providing one adjustment for z₂ and a second adjustment for z₃, z₂ and z₃ may be coupled and varied together through one adjustment. This coupling may be based on the principles described above. A similar approach can be used for cases where other distances from among z₁, z₂ and z₃ are adjustable.

Similar approaches may be used when an existing imaging system is converted to a plenoptic imaging system, as shown in FIGS. 9 a-9 b. FIG. 9 a shows the existing imaging system, which includes a primary lens 910 and a sensor array 932 that captures the conventional primary image. As shown in FIG. 9 b, the conventional sensor array 932 is replaced by a plenoptic sensor module 920, which includes a secondary imaging array 120 and sensor array 130. Retrofit of the plenoptic sensor module includes alignment of the module with the primary imaging subsystem 910, as described above.

In another aspect, the principles described can also be used during the design phase, as shown in the flow diagram of FIG. 10. The pupil image function for a candidate design 1010 is calculated 1020. The PIF is used to calculate a high frequency content metric 1030 and/or a blur metric 1040. If the metrics are sufficiently good, then the lens design is completed 1050. Otherwise, the design is iterated 1060. Other approaches can also be used. For example, different metrics or combinations of metrics could be used. Only the high frequency content metric or only the blur metric could be used, or a metric that combines the two or combines these metrics with other metrics (such as rms wavefront error or spot size) could be used. As another alternative, the metrics could be evaluated without directly calculating the pupil image function.

Although the detailed description contains many specifics, these should not be construed as limiting the scope of the invention but merely as illustrating different examples and aspects of the invention. It should be appreciated that the scope of the invention includes other embodiments not discussed in detail above. Various other modifications, changes and variations which will be apparent to those skilled in the art may be made in the arrangement, operation and details of the method and apparatus of the present invention disclosed herein without departing from the spirit and scope of the invention as defined in the appended claims. Therefore, the scope of the invention should be determined by the appended claims and their legal equivalents. 

1. A method for focusing a plenoptic imaging system, the plenoptic imaging system comprising a primary imaging subsystem, a secondary imaging array, and a sensor array, the method comprising: receiving a plenoptic image of an object captured by the sensor array; and adjusting an axial position of the secondary imaging array relative to the primary imaging subsystem, based on increasing a high frequency content in the plenoptic image.
 2. The method of claim 1 wherein the step of adjusting the axial position of the secondary imaging array relative to the primary imaging subsystem is based on increasing a frequency of ringing in the plenoptic image.
 3. The method of claim 1 wherein the step of adjusting the axial position of the secondary imaging array relative to the primary imaging subsystem is based on increasing a number of ripples caused by ringing in the plenoptic image.
 4. The method of claim 1 wherein the step of adjusting the axial position of the secondary imaging array relative to the primary imaging subsystem is based on increasing a flatness of ringing in the plenoptic image.
 5. The method of claim 1 wherein the step of adjusting the axial position of the secondary imaging array relative to the primary imaging subsystem is based on a metric that accounts for high frequency content in a plurality of subimages within the plenoptic image.
 6. The method of claim 1 wherein the step of adjusting the axial position of the secondary imaging array relative to the primary imaging subsystem is based on a metric that accounts for high frequency content in a plurality of wavelengths within the plenoptic image.
 7. The method of claim 1 further comprising: adjusting an axial position of the sensor array relative to the secondary imaging array, based on reducing a blur in a pupil image function of the plenoptic imaging system.
 8. The method of claim 1 wherein the object includes at least one point object.
 9. The method of claim 8 wherein the object includes an array of point objects, each point object corresponding to an individual imaging element in the secondary imaging array.
 10. The method of claim 1 wherein the plenoptic imaging system includes different wavelength filters for different subimages within the plenoptic image.
 11. The method of claim 1 further comprising: estimating a distance to the object, based on the axial position of the secondary imaging array relative to the primary imaging subsystem.
 12. The method of claim 1 wherein the primary imaging subsystem is a reflective subsystem.
 13. The method of claim 1 wherein the secondary imaging array is a microlens array.
 14. The method of claim 1 wherein the secondary imaging array is a pinhole array.
 15. (canceled)
 16. An autofocus plenoptic imaging system comprising: a primary imaging subsystem; a secondary imaging array positioned approximately at a primary image location for the primary imaging subsystem; a sensor array positioned approximately at a pupil image location for the secondary imaging array; and an autofocus mechanism that adjusts an axial position of the secondary imaging array relative to the primary imaging subsystem, based on increasing a high frequency content in the plenoptic image captured by the sensor array.
 17. The plenoptic imaging system of claim 16 wherein the autofocus mechanism further comprises a lookup table, the autofocus mechanism further adjusting an axial position of the sensor array relative to the secondary imaging array based on the lookup table.
 18. The plenoptic imaging system of claim 17 wherein the lookup table is stored in a chip or software.
 19. The plenoptic imaging system of claim 16 wherein the autofocus mechanism further adjusts an axial position of the sensor array relative to the secondary imaging array, based on reducing a blur in a pupil image function of the plenoptic imaging system.
 20. A method for retrofitting a plenoptic sensor module to an existing imaging system, the plenoptic sensor module comprising a secondary imaging array and a sensor array, the method comprising: positioning the plenoptic sensor module approximately at a primary image location for the existing imaging system; and adjusting an axial position of the plenoptic sensor module relative to the existing imaging system, based on increasing a high frequency content in the plenoptic image captured by the sensor array. 